home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
util
/
dir
/
managers.lha
/
Managers
/
Dir
/
Dir.config
< prev
next >
Wrap
Text File
|
1997-01-15
|
3KB
|
112 lines
G4C
; Ripped this off CliMaster..
winbig -1 -1 500 145 "Dir.gc Configuration"
wintype 11110001
xonload
setscreen dir.config $lv_fmscreen
gosub dir.config loadprefs
guiopen dir.config
xonclose
guiquit dir.config
xonquit
ifexists file env:.dir.prefs
delete env:#?ir.prefs
endif
delvar cfg_#?
; -------------- the listview
xlistview 0 0 0 100 "" cfg_lvline "" 0 txt
gadid 1
gadfont topaz.font 8 000
cgf_lvnum = $$LASTLV
cutvar cfg_lvline cut word 1 cfg_var ; get variable name
cutvar cfg_lvline cut word 1 "" ; cut off the = character
extract cfg_lvline unquote cfg_prog ; clean-up program name
update dir.config 2 $cfg_prog
setgad dir.config 2 on
; -------------- The buttons
xbutton 0 100 100 13 "Save"
gosub dir.config saveprefs
guiquit dir.config
xbutton 100 100 100 13 "Use"
guiquit dir.config
xbutton 300 100 100 13 "««« Move"
lvmove dir.config 1 -10
xbutton 400 100 100 13 "Move »»»"
lvmove dir.config 1 10
xtextin 20 123 400 13 "" cfg_prog "" 512
gadid 2
gosub dir.config updatelist
xbutton 420 123 60 13 "Browse"
reqfile -1 -1 300 -40 "Select File..." load cfg_prog SYS:
update dir.config 2 $cfg_prog
setgad dir.config 2 on
gosub dir.config updatelist
; -------------- Routines
xroutine loadprefs
setvar .dir.prefs ""
gosub dir.config addprefs
lvchange dir.config 1 env:.dir.prefs
xroutine saveprefs
setvar .dir.prefs "G4C - Dir.gc preferences\n\nxOnLoad\n"
gosub dir.config addprefs
append env:.dir.prefs "GuiQuit Dir.prefs\n"
extract dir.gc guipath dcfg_path
ifexists file env:dir.prefs
delete env:dir.prefs
endif
rename env:.dir.prefs env:dir.prefs
action copy env:dir.prefs $dcfg_path
delvar dcfg_path
xroutine addprefs
append env:.dir.prefs 'DEF.EDITOR = \"$DEF.EDITOR\"\n'
append env:.dir.prefs 'DEF.MULTIVIEW = \"$DEF.MULTIVIEW\"\n'
append env:.dir.prefs 'DEF.GUIDE = \"$DEF.GUIDE\"\n'
append env:.dir.prefs 'DEF.HEX = \"$DEF.HEX\"\n'
append env:.dir.prefs 'DEF.ILBM = \"$DEF.ILBM\"\n'
append env:.dir.prefs 'DEF.ANIM = \"$DEF.ANIM\"\n'
append env:.dir.prefs 'DEF.GIF = \"$DEF.GIF\"\n'
append env:.dir.prefs 'DEF.JPG = \"$DEF.JPG\"\n'
append env:.dir.prefs 'DEF.GFX = \"$DEF.GFX\"\n'
append env:.dir.prefs 'DEF.GFXCON = \"$DEF.GFXCON\"\n'
append env:.dir.prefs 'DEF.8SVX = \"$DEF.8SVX\"\n'
append env:.dir.prefs 'DEF.MOD = \"$DEF.MOD\"\n'
append env:.dir.prefs 'DEF.PP = \"$DEF.PP\"\n'
xroutine updatelist
setvar $cfg_var '$cfg_prog'
setvar .dir.prefs ""
gosub dir.config addprefs
lvchange dir.config 1 env:.dir.prefs
RESIZE_BIG 82 37 517 208 dir.config